<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" 
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
      template="template.xhtml">

    <ui:define name="Ccentral">
        <p:panel id="Ccontent" styleClass="panelGridCenter">
            <p:ajaxStatus style="width:64px;height:64px;position:fixed;right:5px;bottom:5px" id="ajaxStatusPanel">  
                <f:facet name="start">  
                    <h:graphicImage style="width:64px;height:64px;" value="/img/loading.gif" /> 
                </f:facet>  
                <f:facet name="complete">  
                    <h:outputText value="" />  
                </f:facet>  
            </p:ajaxStatus>  
            <h:form rendered="#{cPri.esUsuario}" id="formMenu">
                <p:growl id="messages"/>
                <p:dock position="top">  
                    <p:menuitem value="Inicio" actionListener="#{cPri.CambioCentro('index')}" icon="/img/home.png" update=":Ccontent" />   
                    <p:menuitem value="Estadísticas" actionListener="#{cPri.CambioCentro('estadisticas')}" icon="/img/stats2.png" update=":Ccontent" />   
                    <p:menuitem value="Cerrar sesión" actionListener="#{usermanager.logout}" icon="/img/logout2.png" update=":Ccontent" />   
                </p:dock>
            </h:form>
            <h:form rendered="#{!cPri.esUsuario}" id="loginform" style="alignment-adjust:center">
                <ui:include src="login.xhtml" />
            </h:form>
            <h:form rendered="#{cPri.esUsuario}" id="formCentro" enctype="multipart/form-data">
                <ui:include src="#{cPri.pagCentro}.xhtml" />
            </h:form>
        </p:panel>
    </ui:define>
</ui:composition>

